package leetcode_2501_2600;

public class LeeCode_2546 {
    public static void main(String[] args) {
        System.out.println(makeStringsEqual("11", "00"));
    }
    private static boolean makeStringsEqual(String s, String target) {
        int s0 = 0, s1 = 0, t0 = 0, t1 = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '0'){
                s0++;
            }else {
                s1++;
            }
        }
        for (int i = 0; i < target.length(); i++) {
            if (target.charAt(i) == '0'){
                t0++;
            }else {
                t1++;
            }
        }
        return (t1 != 0 || s1 <= 0) && (s1 != 0 || t1 <= 0);
    }
}
